/**
 * Notes: 充值套餐包实体 - 宠物门店预约小程序
 * Date: 2025-01-27 
 */

const BaseModel = require('./base_model.js');
class RechargePackageModel extends BaseModel {}

// 集合名
RechargePackageModel.CL = "ax_recharge_packages";

RechargePackageModel.DB_STRUCTURE = {
	_pid: 'string|true',
	_id: 'string|true|comment=套餐包唯一ID',
	
	name: 'string|true|comment=套餐包名称',
	amount: 'int|true|comment=充值金额(分)',
	bonus: 'int|true|default=0|comment=赠送金额(分)',
	totalAmount: 'int|true|comment=总到账金额(分)',
	isRecommended: 'bool|true|default=false|comment=是否推荐',
	label: 'string|false|comment=标签文字',
	description: 'string|false|comment=套餐描述',
	status: 'int|true|default=1|comment=状态 1:上架, 0:下架',
	
	createTime: 'int|true|comment=创建时间',
	updateTime: 'int|true|comment=更新时间',
}

// 字段前缀
RechargePackageModel.FIELD_PREFIX = "";

// 禁用框架自动功能
RechargePackageModel.ADD_ID = false;
RechargePackageModel.UPDATE_TIME = false;
RechargePackageModel.UPDATE_IP = false;

/**
 * 套餐包状态
 */
RechargePackageModel.STATUS = {
	OFFLINE: 0,   // 下架
	ONLINE: 1     // 上架
};

RechargePackageModel.STATUS_DESC = {
	OFFLINE: '下架',
	ONLINE: '上架'
};

module.exports = RechargePackageModel;